home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
045a
/
cdshare3.exe
/
CDSHARE.DOC
< prev
next >
Wrap
Text File
|
1991-08-23
|
57KB
|
1,651 lines
CD-SHARE DEMONSTRATION SOFTWARE PACKAGE
By - Digital Solutions Pty. Ltd.
Release 1.0 August 1991
The programs and documentation packed with this document file
form the CD-SHARE peer to peer CD-ROM networking software
package.
The demonstration package is a generic version which will run on
any NETBIOS compatible network. It is restricted in that a CD
Server will only accept a log in from one CD Workstation at a
time, and the CD Redirector will only log into one CD Server at a
time.
CD-SHARE sells for A$495.00 (i.e. Australian Dollars). For those
of you in the USA the current exchange rate between the
Australian and US dollar is about US$0.77 for A$1.00.
If you have any questions regarding CD-SHARE please don't
hesitate to contact us at :
Digital Solutions Pty. Ltd.
P.O. Box 178
Margate
QLD, Australia 4019
Ph (07) 8838151 Intl (617) 8838151
Fax (07) 2831217 Intl (617) 2831217
CD SHARE - CD ROM NETWORK SHARING SOFTWARE
Version 1.0
User's Manual
Digital Solutions Pty. Ltd.
P.O. Box 178
Margate
QLD, Australia. 4019
Ph. 07 8831851 Intl. 617 8831852
Fax 07 2831217 Intl. 617 2831217
Page 1
TABLE OF CONTENTS
CONTENTS PAGE
1.0 BACKGROUND 1
1.1 THE CD-ROM SOFTWARE INTERFACE 1
1.2 CD-SHARE - WHAT IT IS AND WHY WE NEED IT 2
2.0 CONFIGURING A CD-SERVER 5
3.0 CONFIGURING A CD-WORKSTATION 5
4.0 COMMAND LINE SWITCHES 9
4.1 CD MANAGER COMMAND LINE SWITCHES 9
4.2 CD REDIRECTOR COMMAND LINE 11
4.3 CD-SERVER COMMAND LINE SWITCHES 11
5.0 CACHING YOUR CD-ROM DRIVES - CD-CACHE 13
6.0 ADVANCED TOPICS 15
6.1 MEMORY USAGE 15
6.2 OPTIMIZING CD-SERVE PARAMETERS 16
FOR A NON-DEDICATED SERVER
6.3 OPTIMIZING CD-CACHE PARAMETERS 17
6.4 RUNNING CD-SERVE AND CD-CACHE IN DEDICATED MODE 19
7.0 QUESTIONS AND ANSWERS 20
Page 2
1.0 BACKGROUND
1.1 THE CD-ROM SOFTWARE INTERFACE
When you purchase a CD-ROM drive and controller card for your PC
you will usually also receive a disk containing a software device
driver for the drive and a program written by MicroSoft Corp
called the "MS-DOS CD-ROM Extensions" (MSCDEX.EXE).
Device drivers are programs that are loaded by including them in
a line in the CONFIG.SYS file on your DOS boot disk. A device
driver is a software program with a standard DOS interface which
allows DOS to talk to hardware devices which it knows nothing
about. Although you don't see it DOS actually talks to your disks
via an internal device driver !
The device driver supplied with your CD-ROM drive(s) allows DOS
to interface to the CD-ROM drive without actually knowing the
hardware specifics of the drive. This is how DOS can interface to
various different brands of drives with different hardware
interfaces - it simply talks via the device driver which does
know about the hardware.
There are two different classes of device drivers - character and
block device drivers. An example of a character device driver are
the internal DOS devices named CON (your console) and PRN (your
LPT1) since they work a character at a time. Your disk drives are
block devices since they transfer data to and from memory in
blocks (e.g. a typical cluster (block) size for a disk might be
2K bytes. Character device drivers and addressed by name (e.g.
CON, PRN, COM1, etc) whereas block type device drivers are
allocated a drive letter by DOS in the range A: to Z:.
A single device driver can control a number of drives, in fact up
to 255. Since DOS only allows block device drive names A: to Z:
this limits the practical total number of drives to a total of 26
minus any physical hard and floppy disk drives that are
installed. If you had two floppy disks and one hard disk
installed (A;, B: and C:) and a device driver named 'DEVICED' was
installed controlling 3 block devices the system would be as
follows :
┌──── A:
│
├──── B:
│
├──── C:
DOS──────┤ ┌───────────┐ ┌──── E:
│ │ │ │
└───┤ DEVICED ├────┼──── F:
│ │ │
└───────────┘ └──── G:
Fig. 1
Page 3
DOS automatically gives block devices the next available drive
letter(s) when the device driver is installed in the config.sys
file.
If CD-ROM's were normal block device that would be the end of the
story, however a single CD-ROM can hold a massive 550 MBytes of
information - far more than DOS was designed to manage on a
single block device. To overcome this limitation MicroSoft wrote
some extensions to DOS known as the "MS-DOS CD-ROM Extensions"
(MSCDEX). MSCDEX uses the networking drive redirection features
built into DOS versions 3.1 and later to create a logical drive
for each drive attached to each device driver specified on the
MSCDEX command line when the extensions are started. MSCDEX is
not a device driver, it is a "Terminate and Stay Resident" (TSR)
program which runs and returns to DOS but remains in memory to
it's work in the background.
So that CD-ROM device drivers won't be installed by DOS as block
devices the device driver header tells DOS that they are
character devices (even though they aren't). CD-ROM device
drivers are block device drivers that appear to DOS as character
devices but have a special signature so that MSCDEX and other
software wishing to talk to the CD-ROM via the device driver can
recognize them as CD-ROM devices. If our previous example (Fig.
1) of DOS with a three drive device driver were replaced by
MSCDEX and a device driver (CDDRIVER) driving three CD-ROMS the
layout would now be as follows :
┌──── A:
│
├──── B:
│
├──── C:
DOS──────┤ ┌──────────┐ ┌──────────┐ ┌──── E:
│ │ │ │ │ │
└───┤ MSCDEX ├──┤ CDDRIVER ├──┼──── F:
│ │ │ │ │
└──────────┘ └──────────┘ └──── G:
Fig. 2
When MSCDEX or any other software calls a CD-ROM device driver it
specifies which drive (or unit) it wishes to access by specifying
a number beginning with zero. It figure 2 the logical drives E:,
F: and G: would be drives 0,1 and 2 to CDDRIVER.
1.2 CD-SHARE - WHAT IT IS AND WHY WE NEED IT
As well as making CD-ROM's appear as normal (large capacity) disk
drives, MSCDEX supplies a number of other services to
applications software that calls MSCDEX directly. Although
networks such as ArtiSoft's LANtastic can redirect a CD-ROM drive
so that it appears as an extra drive on a network workstation,
Page 4
CD-ROM software that requires MSCDEX to run won't work. To make
matters even worse some CD-ROM software bypasses MSCDEX
completely and talks directly to the CD-ROM device driver.
This is where CD-SHARE comes in. The CD-SHARE software contains
CD-Server and CDWORK/CD-Redirector. CDServer is a TSR program
which is run on the network computer which has the CD-ROM drives
fitted and the appropriate CD-ROM device drivers installed.
CDWORK.SYS and CD-Redirector are run on workstations which wishes
to access CD-ROM devices on CD-Servers. CDWORK.SYS appears as a
local CD-ROM device driver, however it passes and device requests
onto CD-Redirector which in turn passes the requests to the
appropriate CD-Server for processing. The results of the request
are passed back to CD-Redirector/CDWORK.SYS and then back to the
application which called CDWORK.SYS . CDWORK.SYS therefore
appears to applications programs (including MSCDEX) as a local
CD-ROM device driver.
The CD-Manager program allows you to alter the number of drives
that CDWORK.SYS appears to be controlling, and to connect each of
those logical drives to a CD-ROM drive on a network machine
running CD-SERVER.
Because CD-ROM seek times and data transfer rates are so slow
sharing a single CD-ROM amongst a number of users usually causes
applications on workstations to run unacceptably slow. Because of
this the CD-SHARE software suite also includes CD-CACHE which is
a CD-ROM caching program written specifically to run in
conjunction with CD-SHARE. When CD-CACHE running, when a request
to read CD-ROM data occurs CD-CACHE checks to see if it has
already been read. If not then the data is read from the CD-ROM
and stored in the cache as well as being passed back to the
calling software. If a request for data which is already in the
cache occurs then the data is returned directly from the cache
without any access at all to the CD-ROM. The CD-CACHE algorithm
ensures that the most frequently read data (directories, etc) are
always kept in the cache, this improves response times even when
only one users is running programs from the CD-ROM. CD-CACHE can
use conventional or extended memory up to 32 MBytes.
The networking version of figure 2 using CD-SHARE would appear as
follows :
┌──── A:
│
├──── B:
│
├──── C: ┌────────┐
DOS─┤ ┌────────┐ ┌────────┐ ┌─────┐ ┌─────┐ │ ├─── 0
└─┤ MSCDEX ├─┤ CDWORK ├─┤ CDR │-----│ CDS ├─┤CDDRIVER├─── 1
└────────┘ └────────┘ └─────┘ ^ └─────┘ │ ├─── 2
│ └────────┘ ^
Network Connection ──┘ Drive Nos.───┘
Fig. 3
Page 5
Where :
1. CDWORK is the CD-Share CD-ROM device driver
2. CDR is the CD-Redirector
3. CDS is the CD-Server
Note that figure three is a very simple configuration. Each copy
of CDS which is started on a CD-Server is started up with a
unique name and can be attached to multiple device drivers on the
server computer. Using CD-Manager (CDM) each logical drive on
CDWORK may be connected to any CDServer\Device\Drive. For Example
SERVERS DEVICE DRIVERS DRIVES
┌──────────┐ ┌────────────┐ ┌───── 0
+-------│ CDSERV-1 ├───┬──┤ DRIVER1 ├──┤
| └──────────┘ │ └────────────┘ └───── 1
| │ ┌────────────┐ ┌───── 0
| └──┤ DRIVER2 ├──┼───── 1
| └────────────┘ └───── 2
|
| ┌──────────┐ ┌────────────┐ ┌───── 0
+-------│ CDSERV-2 ├──────┤ DRIVER1 ├──┼───── 1
| └──────────┘ └────────────┘ └───── 2
|
| ┌──────────┐ ┌────────────┐ ┌───── 0
+-------│ CDSERV-3 ├───┬──┤ DRIVER1 ├──┤
| └──────────┘ │ └────────────┘ └───── 1
| │ ┌────────────┐ ┌───── 0
| ├──┤ DRIVER2 ├──┼───── 1
| │ └────────────┘ └───── 2
| │ ┌────────────┐
| └──┤ DRIVER3 ├──────── 0
| └────────────┘
|
|
| WORKSTATION
|
| DEVICE DRIVER ATTACHED TO DRIVES
|
| ┌─CDSERV-1\DRIVER2\2 = 0
| ┌─────┐ ┌────────┐│
+-------│ CDR ├─┤ CDWORK ├┼─CDSERV-3\DRIVER3\0 = 1
└─────┘ └────────┘│
└─CDSERV-1\DRIVER1\1 = 2
Fig. 4
Note that since CDWORK simulates a CD-ROM device driver, there is
no need to run MSCDEX on workstations running software that talks
directly to the CD-ROM device driver. Also CD-Server is a
non-dedicated server, this means that CDR and CDWORK may also be
run on the server which may then log into and use devices made
networkable by it's own copy of CD-Serve as well as other
CD-Servers.
Page 6
2.0 CONFIGURING A CD-SERVER
1. Install the CD-ROM drives, controllers, etc. and device
drivers then test run the drives and programs as if the
system were not to be networked to make sure everything is
okay before adding the CD-Server.
2. If you have run MSCDEX in step 1, then re-boot the computer
and DON'T run MSCDEX. Copy the CDServer (CDS.EXE) from the
CD-Share distribution disk onto your system boot disk.
3. Make sure your network NETBIOS driver has been installed
(with LANtastic this is AILANBIO, LANBIOS, or LANBIOS2). You
won't need any other networking software on a CD-ROM
workstation or a CD-Server in order to run the CD-Share
programs. (You can still run network re-directors,
non-dedicated servers, etc. if need be).
4. Assuming you wish to allow five logged in users, have named
your CD-ROM device drivers DRIVER1, DRIVER2, etc (You will
have specified the driver names on the "DEVICE=" line for the
drivers in the config.sys file. Typical names take the form
MSCD001, MSCD002, etc) and we wish to call our CD server
cdserver1 enter the following command line :
CDS CDSERVER1 device=DRIVER1 device=DRIVER2 verbose users=5
The "device=DeviceName" section may be repeated up to eight
times. CD-Serve can handle up to 32 drives (e.g. four device
drivers each driving eight drives, or eight drivers each
driving four drives, one driver driving eight drives and four
drivers driving six drives, or any mix). The verbose option
is optional and causes CDS to indicate the names of connected
device drivers as they are attached to confirm that the
command line was accepted correctly. The "device=" section
may be abbreviated to "d=" to fit more switches on the
command line. CDS has more command line switches, they are
covered in the "Advanced Topics" section.
Note that after CDS has been run, all connected device
drivers are effectively removed from the DOS device list so
they can't be accessed by any other software. If you need to
access the device drivers in order to gain access to the
CD-ROM(s) from software running locally on the server you
will have to configure the server as a workstation as well.
3.0 CONFIGURING A CD-WORKSTATION
1. Copy the programs CDWORK.SYS, CDR.EXE (CD-Redirector), and
CDM( CD-Manager) onto the workstation disk. CDWORK.SYS should
be in the root directory, CDR.EXE and CDM.EXE should be in a
directory which is on the PATH.
Page 7
2. Insert a line similar to that following in the config.sys
file on the workstation boot disk :
DEVICE=CDWORK.SYS [DEVICE_NAME]
Where DEVICE_NAME is the name that MSCDEX or any other CD-ROM
software will use to access the CD-ROM driver. Typical
examples might be :
DEVICE=CDWORK.SYS MSCD001
OR
DEVICE=CDWORK.SYS CDWORK
We will assume that the name CDWORK is used in future
discussion. Whatever you use, make sure that the name doesn't
conflict with a name you have given to any other device
drivers (e.g. if you are setting up a non-dedicated CD-Server
you will have both CDWORK.SYS and real CD-ROM device drivers
installed in the config.sys file).
3. You will now have to re-boot the computer so that CDWORK.SYS
is installed. CDWORK.SYS will sign on with a line similar to
CDWORK Installed - Copyright Digital Solutions
during the boot sequence.
4. Make sure that your network NETBIOS driver has been
installed. Assuming you wish to call your CD Workstation CDW1
and you wish to redirect to a maximum of two CDROM's
simultaneously enter the following command line :
CDR CDW1 2
The actual syntax for the CDR command line is :
CDR [Station Name] {Maximum Drives}
where [] indicates that the parameter is mandatory and {}
indicates that the switch is optional. If "Maximum Drives" is
not specified it defaults to one. This is all that usually
required since CD-Manager (CDM) can be used to disconnect the
redirected CD-ROM drive from any CD Server device and
re-connect to another at will. Also MSCDEX uses an additional
4K of memory for each logical drive on a device driver.
5. You can now use CDM to connect to devices and drives on any
CD-Servers that are on line. To log into and connect to our
CDSERVER1, DEVICE1, DRIVE 0 that we set up in the previous
section, enter the following command line :
CDM V IN:ON +:0=\\CDSERVER1\DEVICE1\0
Page 8
After CDM connects output similar to the following should
appear on the screen :
C:\CDM V IN:ON +:0=\\CDSERVER1\DEVICE1\0
DEVICE1 : Units = 2
CD - REDIRECTOR STATUS....
Connected servers..
\\CDSERVER1
Drives..
Drive 0: Connected to \\CDSERVER1\DEVICE1\0
Drive 1: NOT Connected
Total Servers Attached : 1
Total Drives Attached : 1
Maximum Drives Attached : 2
Activity Indicator is : ON at Row 1, Column 80
C:\
Fig. 5
Let's analyze the command line to set what we've done. The
first switch V{erbose} tells CDW to work in verbose mode.
This is why the line
DEVICE1 : Units = 2
appeared, and why the CD Redirector status was listed in
full.
The next switch
IN{dicator}:ON
tells CDM to turn on the CD Redirector activity indicator.
This causes a small activity indicator to flash on the
workstation as CD-ROM activity is in progress. By default the
position of this is row one, column 80 on the screen (upper
right corner), see "CDM Command Line Switches" for details on
how to change this position.
The next switch requires a little more description :
+:0=\\cdserver1\device1\0
The + option tells CDM to add a new connection to CDWORK, in
Page 9
this case to a drive 0, on a device named "device1" on a CD
Server named "cdserver1". The actual syntax is as follows :
+:[Local Drive Number]=\\[Server Name]\[Device Name]\Drive
Where a device named "Device Name" be attached to a CD Server
named "Server Name" and that device must have a drive number
"Drive".
If you now run the Microsoft extensions on the workstation
specifying the name that you gave CDWORK.SYS (we'll use
CDWORK as the name) you should get the following response :
C:\mscdex /d:cdwork
MSCDEX Version 2.10
Copyright (C) Microsoft Corp. 1986, 1987, 1988, 1989. All
rights reserved.
Drive D: = Driver CDWORK unit 0
Drive E: = Driver CDWORK unit 1
C:\
Fig. 6
Note that your drive letters may not necessarily begin at D:
depending upon the drives installed in your computer and any
redirected network drives you may have.
If you now type :
DIR D:
You should now get a directory listing of the root directory
of the disk in your CD-ROM drive.
Note that if you now type in
DIR E:
You will get an error message from MSCDEX stating that the
drive is not ready, this is because drive E: which is
attached to DRIVE 1 on CDWORK is not connected to a server
device (see Fig. 5).
Now that MSCDEX has been run you may refer to the CDWORK
drives by their drive number, or by their MSCDEX drive letter
when using CDM.
The - CDM command line switch allows a drive connection to be
removed e.g.
CDM -:0, or CDM -:D
Would cause CDWORK drive 0 (Fig. 5) to be disconnected, or
Page 10
CDM LOGOUT:CDSERVER1
Would cause all connections to CDSERVER1 to be removed.
4.0 COMMAND LINE SWITCHES
4.1 CD MANAGER COMMAND LINE SWITCHES
The syntax of the CD Manager (CDM.EXE) command line is as follows
CDM {switches}
Where {switches} represents any of the following switches, each
separated by a space. Note that any characters between {} braces
are optional, the {} characters do NOT form part of the switch.
Square braces [] indicate that the words between the [] are a
name and should not be entered as shown. i.e. The name of a
Device, CD Server, or Drive Number should be substituted for the
[name] entry (the [] characters are not required. e.g. To
indicate that a device name is required we might say [Device
Name], when CDM is actually run we might use DEVICE1 instead of
[Device Name]. In all cases a = character may be substituted for
the : character in the following list.
Switch Function
V{erbose} Causes verbose operation of CDM. CDM will report
various activities as they are processed and will
cause CDM to show a CD Redirector status listing
after all other switches have been processed.
Sh{ow} Causes CDM to display CD Redirector status after
all other switches have been processed.
Logo{ut}: Syntax
Logout:Server_Name
Causes all CDWORK drive connections to CD Server
"Server_Name" to be deleted and the connection to
"Server_Name" to be removed.
+: Syntax
+:[Local Drive]=\\[ServerName]\[DeviceName]\[Drive]
Attaches the CDWORK drive [Local Drive] to [Drive]
on a device named [DeviceName] on a CD Server named
[ServerName]. For [Local Drive] either the local
CDWORK drive number or the drive letter may be used
if MSCDEX has been run. [Drive] may be replaced by
ALL if you want all of the drives on [DeviceName]
to be attached to CDWORK beginning with CDWORK
Page 11
drive [Local Drive]. e.g. to Connect local drive 1
to [Drive] 2 on [DeviceName] MSCD001 on
[ServerName] CDSERVER1 the following switch would
be used
+:1=\\CDSERVER1\MSCD001\2
If MSCDEX had been run and Local Drive number
corresponded to drive E: then the following syntax
could also have been used
+:E=\\CDSERVER1\MSCD001\2
-: Syntax
-:[Local Drive]
Disconnects [Local Drive] from the device it is
currently attached to. [Local Drive] may be either
the CDWORK logical drive (unit) number or the
MSCDEX drive name if MSCDEX has been run.
Dr{ives} Syntax
Drives:[New Number of Local Drives]
Alters the number of logical drives that CDWORK can
redirect. This switch will not be accepted if
MSCDEX has already been run.
In{dicator} Syntax
Indicator:[On|Off]{@Row,Column}
Turns the CD Redirector activity indicator On or
Off depending upon whether On, or Off is specified
after the : . If On is specified you may optionally
specify the screen coordinates by following On with
@Row,Column ; where valid ranges for row and column
are 1 to 25 and 1 to 80 respectively. The default
position for the indicator is 1,80. For example to
turn the indicator on at row 25, column 80 the
following switch would be used
in:on@25,80
or to turn it off
in:off
Note that if in:on is specified without a new
position, then the previous position setting is
retained.
Page 12
4.2 CD REDIRECTOR COMMAND LINE
The CD Redirector (CDR.EXE) command line must contain a unique
name for the CD Redirector session and can contain an optional
number of Local Drives specifier for CDWORK.
CDR [Unique Name] {Number of Local Drives}
e.g.
CDR STN1 1
The number of local drives defaults to one if not specified.
Since MSCDEX uses an extra 4K of ram per local drive, a figure of
1 is recommended if MSCDEX is to be used. Since it is unlikely
that a workstation will be accessing more than one CD-ROM
simultaneously this does not impose a limitation as CDM can be
used to alter the actual CD-ROM drive that the single local drive
is connected to at any time.
Note that providing MSCDEX hasn't been run CDM.EXE can also be
used to alter the number of local drives.
CDR can be logged into a maximum of five CD Servers at any one
time. Local Drives can range from one to twenty five.
4.3 CD-SERVER COMMAND LINE SWITCHES
The syntax of the CD Server (CDS.EXE) command line is as follows
CDS [Server_Name] device=device_name {switches}
[Server_Name] a unique name which is used to represent the CD
Server on the network. At least one device must be specified.
Where {switches} represents any of the following switches, each
separated by a space. Note that any characters between {} braces
are optional, the {} characters do NOT form part of the switch.
Square braces [] indicate that the words between the [] are a
name and should not be entered as shown. i.e. The name of a
Device, CD Server, or Drive Number should be substituted for the
[name] entry (the [] characters are not required. e.g. To
indicate that a device name is required we might say [Device
Name], when CDS is actually run we might use DEVICE1 instead of
[Device Name]. In all cases a = character may be substituted for
the : character in the following list.
Switch Function
D{evice} Syntax
Device:[Device_Name]
Page 13
where [Device_Name] is the named of a CD-ROM device
driver already installed on the server. This switch
may be used a maximum of eight times connecting to
a maximum of 32 drives per server (each device
driver can handle multiple drives - the total of
these drives must not exceed 32). Device drivers to
which CDS attaches are removed from the DOS device
list so other programs can no longer access the
device(s).
Us{ers} Syntax
Users:[Maximum Number of logged in CD users]
Note that a NETBIOS session is required for each
logged in user. CDS DOES NOT check that your
NETBIOS can support the number of sessions
corresponding to your Users specification, it is
the responsibility of the network configurer to
ensure that enough netbios sessions will be
available. (Up to 254 with LANtastic)
Bu{ffer} Syntax
Buffer:[Buffer Size in sectors]
e.g. Buffer:4
Specifies the size of the network transfer buffer
used to pass CD ROM data to CD workstations. The
actual buffer size is approximately 2K by the
specified buffer size. The default Buffer Size is
three sectors (about 6K). Larger buffers improve
performance but use more memory when CDS is
installed leaving less room for other programs to
run (This is not a consideration when running a CD
Server in dedicated mode). Note that one buffer is
allocated PER network task (see "Tasks")
Ta{sks} Syntax
Tasks:[Number of Network Tasks]
e.g. Tasks:3
The network tasks figure determines how many
network CD requests the server can handle
simultaneously. The default is one. On a
non-dedicated server the law of diminishing returns
is reached at a figure of about five tasks. Three
tasks is usually adequate, use two if memory is
tight.
5.0 CACHING YOUR CD-ROM DRIVES - CD-CACHE
Page 14
CD-CACHE is a caching program specifically designed to work in
conjunction with CD-Serve on a CD-ROM server. Because of the slow
access times of CD-ROM drives use of CD-CACHE is almost essential
if three or more than three users will be accessing the CD-ROM
simultaneously. In fact using CD-CACHE will usually speed up
response times even when only one user is accessing the CD-ROM.
CD-CACHE can use conventional, extended, expanded, or XMS memory
for caching purposes CD-CACHE will cache any accesses to any of
the CD-ROM drives (i.e. up to 32) that are being managed by CD
Serve (CDS.EXE).
Like CDS.EXE CD-CACHE (CDC.EXE) is a TSR program. This means that
when you run CDC from the command line it will install itself and
return to the DOS prompt while remaining in memory to perform CD
caching as necessary. CDC will not install unless CDS has already
been installed.
CDC has a number of command line switches, the two that will most
commonly be used are those that specify the type of memory CDC is
to use for caching purposes and the amount of memory to use for
caching.
The syntax of the CD Cache (CDC.EXE) command line is as follows
CDC {switches}
Where {switches} represents any of the following switches, each
separated by a space. Note that any characters between {} braces
are optional, the {} characters do NOT form part of the switch.
Square braces [] indicate that the words between the [] are a
name and should not be entered as shown. i.e. A number of KBytes
of memory to be used would be substituted for the [Cache Size in
Kbytes] entry (the [] characters are not required. When CDC is
actually run we might use 1000 instead of [Cache Size in KBytes].
In all cases a = character may be substituted for the : character
in the following list. Command line switches are not case
sensitive, i.e. TYPE is the same as Type or typE.
Switch Function
Type Syntax
Type:{Conv|Ext|Ems|Xms}
e.g.
TYPE:CONV means to use conventional memory (below
the 640K boundary) for caching.
TYPE:EXT for Extended Memory
TYPE:EMS for Expanded memory
TYPE:XMS for XMS memory
Page 15
The default is Conventional if no TYPE switch is
used.
Size Syntax
Size:[Cache Size in KBytes]
e.g. type:1000 for a 1MByte cache. The default is
to use ALL of the specified type of cache memory if
no size switch is found. Note that if you use all
of conventional memory as cache it is preferable to
use the Dedicate CDC switch to cause the CD Server
to run dedicated, this will always use all of
conventional memory for caching as well as
improving performance dramatically and leaving you
the option of unloading CDC at any time without
re-booting the CD Server. See the "Dedicate" CDC
switch for more detail. If you run CD-CACHE not
dedicated and use all available conventional memory
for caching there will be NO MEMORY LEFT TO RUN
OTHER PROGRAMS.
Ded{icate} Causes CD Cache to run the CD-Server in dedicated
mode. This improves CD-Server performance
dramatically (5 to 10 fold) and will add any
remaining conventional memory available after CD
Cache has loaded to the cache memory. E.G. if you
have specified 1MByte of extended memory as cache
and use the dedicate switch, and CD Cache finds
that 500K of conventional memory remain available
after it has loaded - your total cache size would
be 1.5MBytes. When CD Cache is run in dedicated
mode pressing the Esc key on the CD-Server keyboard
will unload CD Cache and return to the DOS command
line, leaving the CD Server as a non-dedicated,
non-cached (as far as CD ROM's are concerned)
server.
Buff{er Sectors}
Syntax
Buffer:{Buffer Size in Sectors}
When CD-Cache performs any CD-ROM reads it ALWAYS
reads the same number of sectors into cache memory
then returns the requests sectors from the cache to
CD Server. For optimum performance the Buffer Size
set for CD-Cache should be a multiple of that set
for CD Serve. The default for CD Serve is three
sectors and the default for CD-CACHE is six. As you
can see the default of six for CD-Cache will be a
multiple of Buffer settings for CD Server of one,
two, or three sectors. The maximum buffer size
setting is 25 sectors (about 64KBytes). The buffer
Page 16
size you choose will be determined by the amount of
conventional and cache memory you are willing to
let CD-Cache use and the performance you require
from the server. See the "Advanced Topics" section
for information on how to make decisions on the
best combinations of options to select for CD
Server and CD Cache to optimize performance for
your application.
An example command line for running CD Cache in dedicated mode
using 2 MBytes of extended memory would be as follows :
CDC Type:Ext Size:2000
6.0 ADVANCED TOPICS
6.1 MEMORY USAGE
The amount of conventional memory used by the various CD Share
programs and MSCDEX after being loaded is listed below.
NOTE: 1K = 1024 Bytes
PROGRAM MEMORY USED
CDWORK.SYS < 650 Bytes
CDR.EXE 8 KBytes
CDS.EXE 12K + Users * 106 + Tasks * (BufferSecs*2532 + 225)
e.g. 10 Users, 2 tasks, 5 sectors per buffer =
12K + 10 * 106 + 2 * ( 5 * 2532 + 225)
= 39118 Bytes
= 38.2 K
CDC.EXE Conventional Cache :
12K + Size of Cache
Other :
Buffer Size Bytes(BSB) = BufferSectors * 2532
Buffers in Cache (BIC) = CacheSize/BSB
Conventional Memory used = 12K + BIC*34 + BSB
e.g. Cache Size = 2MBytes of Extended Memory
BufferSectors = 6
BSB = 6 * 2532 = 15192 Bytes
BIC = (2000 * 1024)/15192 = 134(.8)
Page 17
Conv Mem Used = 12K + 134*34 + 15192
= 31012 Bytes
= 30.3 K
MSCDEX.EXE 22K + 4K per logical drive (e.g. one device driver
controlling 2 drives would use approximately 30K).
This will vary slightly according to the version of
MSCDEX.
6.2 OPTIMIZING CD-SERVE PARAMETERS FOR A NON-DEDICATED SERVER
For a non-dedicated CD Server we are assuming that you want the
server to use as little memory as possible. As with most things
in real life you rarely get something for nothing - the more you
prune back the resources available to CD Serve the poorer the
performance will be. The trick is to strike a compromise which
gives both acceptable memory usage and acceptable performance.
As you can see from the CDS.EXE section in section 6.1 CDS
conventional memory usage is governed by three parameters
1. Users
2. Buffer Sectors
3. Tasks
Obviously you should only specify the number of CD users that you
actually want the CD Server to be able to have connected at any
one time.
The "Buffer Sectors" parameter defines the size of the memory
buffer that CDS uses to return CD ROM data to a CD Redirector.
The larger this parameter is made (Max 25) the larger the block
of data that the server can send to the CD Redirector in one hit.
However the maximum figure of 25 sectors amounts to a buffer size
of about 64K and there is one buffer allocated per network task,
as you can see allocating large buffers and tasks can quite
quickly gobble up huge amounts of memory.
The number of tasks determines how many CD network requests that
the CD Server can process at any one time. Performance will
improve as the number of tasks is increased. The law of
diminishing returns is reached for a non-dedicated server at a
figure of about five tasks.
The question then arises as to which combination is best for a
non-dedicated server. The answer of course lies in the question
"how much memory do you want left over after CDS has been run and
what level of performance are you going to consider as
satisfactory ?". For minimum memory usage both the Buffer Sectors
and Tasks should be reduced to a minimum. The default buffer
sectors setting is three, a setting of two is probably a good
starting point if you a trying to minimize memory usage and
Page 18
maintain reasonable performance. A Tasks setting of two will give
a fairly substantial improvement over the default of one,
improvements will be gradually decreasing as the number of tasks
is increased through three, four, and five.
With this background experimentation is probably the best
indicator of what will be acceptable for your application. When
evaluating performance it should be noted that CD ROM
applications usually have long periods of disk inactivity
interspersed with short bursts of activity when programs and
images are loaded from the CD ROM. A simple method of gauging
performance is to create a batch file on a number of workstations
which reads a large number of files from the CD-ROM into a
temporary file on a hard disk, deletes the temporary file then
loops to the beginning - timing the loop will give an indication
of performance. If you have this arrangement set up and you wish
to re-boot the server in order to alter CDS parameters it is
quite acceptable to simply re-boot the server. Each CD Redirector
will eventually report an error and MSCDEX will give you the
options Abort, Retry, or Ignore. After CDS has been re-run on the
CD Server simply select Retry and the CD-Redirector will
re-connect to the server and continue.
6.3 OPTIMIZING CD-CACHE PARAMETERS
We will assume here that for a non-dedicated CD Server CD Cache
will always be run using cache memory other than conventional
memory; since you would have to use all of the conventional
memory in order to make the cache of any use and if you do this
you might as well run the CD Server in dedicated mode and get
some real performance improvements !
As you can see from the calculations for CDC.EXE conventional
memory usage when using extended memory, the additional memory
that CDC uses beyond it's fixed code and data size is made up of
two components
1. A single buffer the size of which is set by the
"BufferSectors" command line switch. The default setting
for this is 6 sectors or about 15 KBytes.
2. Cache Buffer management memory which amounts to 34 bytes
for each time the buffer allocated at step 1 will fit into
the cache memory size.
From step 2 we can see that for a given amount of cache memory
the amount of cache management memory required increases as the
"Buffer Sectors" setting decreases. In the example calculation of
section 6.1 for 2MByte of cache memory and 6 sectors per buffer
we used 134 * 34 Bytes = 4556 bytes for cache management and
15192 bytes for the buffer for a total extra conventional memory
usage of 19748 Bytes. If we halved the buffer size to three
sectors we could used 269 * 34 = 9146 Bytes for management plus
7596 bytes for buffering for a total of 16742 bytes. As you can
Page 19
see we have only reduced the consumption of conventional memory
by 3K but we have more than doubled the fragmentation of the
cache.
As a general rule, the larger the Buffers per Sector setting the
better as it allows the CD-ROM to read more information in a
single disk read thus eliminating a seek from another position on
the disk when sequential sectors are read from the server.
However a quick glance at some files on a CD-ROM will reveal that
many of the files (and the directories if you could see their
size) are actually less than 20K in length. This means that since
there is usually very little file fragmentation many of these
files could be read with a single access from the CD ROM. Note
that although CD-CACHE allocates 2532 bytes per sector so that it
can cope with CD-ROM applications that request sector data in RAW
mode (2532 bytes per sector) most applications read the CD-ROM in
cooked mode which returns 2048 bytes per sector (2K). Thus a 12
sector buffer would generally read 24K bytes per read. Although
CD-CACHE will accept buffer sizes up to 25 sectors, using values
above 12 decreases the granularity of the cache for very little
improvement in performance.
For optimum performance the Buffer size should be set to a
multiple of the BufferSectors setting used with CDS. The default
CD-CACHE buffer size is set to six sectors, this is a good
compromise between conventional memory usage and performance, and
is also a multiple of the default CD-SERV buffer size of three
sectors (Also of 2, and 1 !).
You should choose your buffer sectors setting with the following
things in mind:
1. If you are caching a large number of drives running
different applications, then for a given cache size
smaller buffers are going to increase buffer granularity
and therefore more likely to keep more of the frequently
used sections of each CD-ROM in the cache.
2. If you don't have much memory to use as cache memory
smaller buffers are better as this will help to improve
the granularity.
3. If you have plenty of cache memory in comparison to the
number of CD-ROM's that are being cached then you can
increase the buffer size to improve performance and reduce
CD-ROM drive wear and tear while still achieving good
granularity.
4. If you are running CD-CACHE in non-dedicated mode then you
should choose a buffer size which results in an acceptable
compromise between conventional memory used and
granularity
Page 20
6.4 RUNNING CD-SERVE AND CD-CACHE IN DEDICATED MODE
If you want the ultimate in performance - dedicate your CD-ROM
Server !
When using CD-CACHE you can optionally tell it to run CD Server
in dedicated mode. This will give an immediate speed improvement
of usually at least five hundred percent as well as allowing
CD-CACHE to add all remaining conventional memory to it's cache
buffers.
As a bonus you can unload CD-CACHE and return the CD-Server to
non-dedicated/non-cached operation at the touch of a key without
disturbing and other network users using the CD-ROM's on the
server.
To run in dedicated mode simply include the "Dedicate" switch on
the CD-Cache command line as follows :
CDC Type:Extended Size:2000 Dedicated
CD-Cache will respond with a message saying that it is installed
and running CD-Serve in dedicated mode.
To unload CD-Cache and return to non-dedicated CD Server
operation simply press the Esc key. Network users logged in and
using the CD-ROM at this time will notice nothing excepting for a
dramatic decrease in performance.
If a computer is being used specifically as a dedicated CD Server
in order to share multiple CD ROM's with maximum performance then
the memory constraints which are important when running in
non-dedicated mode lose there importance. The CD Serve buffer
size should be increased to about six sectors and tasks to about
five. The CD-CACHE buffer size should also be set to at least
twelve sectors (you should install plenty of cache memory).
Read sections 6.2 and 6.3 (if you haven't already done so) to get
a good understanding of the performance consequences of altering
the CD-Serve and CD-Cache buffer sizes.
Page 21
7.0 QUESTIONS AND ANSWERS
Question : Does a network computer need to be set up as a
network server or have a redirector or MSCDEX
installed in order to be used as a CD-Server.
Answer : No - All that is required of the network in order
to run CD Serve on a computer is a NETBIOS network
driver.
Question : Do I need to run the network redirector on a CD ROM
workstation.
Answer : No - All that is required on the workstation is
that CDWORK.SYS is included and given a device name
in the CONFIG.SYS file on the workstation boot disk
and that network NETBIOS network driver is
installed before running CDR.EXE.
Question : Do I need to run MSCDEX on a CD-ROM workstation.
Answer : Only if your CD-ROM application requires MSCDEX.
Many CD-ROM applications install themselves on the
workstation hard disk then interface to the CD-ROM
directly via the device driver (CDWORK.SYS in this
case) - these applications usually only require
MSCDEX for the initial installation (i.e. to copy
the program files from the CD-ROM to the hard
disk).
Question : Can I use a CD-ROM workstation to perform normal
network activities by running the network
redirector.
Answer : Yes - the CD Redirector and CDWORK appear simply as
another device driver to both the network and to
DOS.
Question : Can I run CD Serve in dedicated or non-dedicated
mode on a normal non-dedicated network server (e.g.
LANtastic)
Answer : Yes, although the activities of the two servers
will serve to reduce the performance of both when
running under heavy load conditions.
Question : I cannot run my normal network redirector up after
running CDR and MSCDEX
Answer : MSCDEX is implemented as a network re-director.
Your network redirector sees MSCDEX as a previously
installed network redirector and refuses to
install. The solution is to run MSCDEX after your
Page 22
network redirector (and before your server if
running the machine up as a non-dedicated network
server e.g. LANtastic's SERVER.EXE).
Question : After running MSCDEX I don't have enough memory to
run my CD-ROM program.
Answer : MSCDEX uses an extra 4K of memory for every drive
on every device driver it is attached to. Make sure
that when running CDR.EXE or CDM.EXE that you don't
set the number of drives supported by CD Redirector
to more than one. You can then use CDM.EXE to alter
this one logical CD-ROM drive to different CD-ROM
drives on any CD Servers on the network as and when
required.
Question : After I run MSCDEX I get devices with names like
G.\A.
H.\B.
I.\C.
In my network connection manager's list of
redirected drives and I can't remove the
connection.
Answer : MSCDEX functions in exactly the same way as your
network redirector - it uses the DOS redirection
functions and therefore the CD-ROM logical drives
appear in the list of redirected drives. Because
your network redirector doesn't recognize these as
it's own re-directed drives it won't alter these
connections.
Page 23